﻿using AbstractFactoryPattern.Abstractions;
using System;
using System.Collections.Generic;
using System.Text;

namespace AbstractFactoryPattern.ConcreteProducts
{
   public class LZPizza : Pizza//柳州披萨
    {
        private readonly IPizzaIngredientFactory _LZpizzaIngredientFactory;
        public LZPizza(IPizzaIngredientFactory pizzaIngredientFactory)
        {
            _LZpizzaIngredientFactory = pizzaIngredientFactory;
        }

        public override void Prepare()
        {
            Console.WriteLine($"正在准备柳州披萨: {Name}");
            Dough = _LZpizzaIngredientFactory.CreateDough();
            Sauce = _LZpizzaIngredientFactory.CreateSauce();
            Clams = _LZpizzaIngredientFactory.CreateClams();
            Cheese = _LZpizzaIngredientFactory.CreateCheese();
            Console.WriteLine($"    {Dough.Name}");
            Console.WriteLine($"    {Sauce.Name}");
            Console.WriteLine($"    {Clams.Name}");
            Console.WriteLine($"    {Cheese.Name}");
        }
    }
}
